(ns qwiz.gamecore.chat
  (:use [qwiz.gamecore.core]))

(def chat-logs (ref []))

(defn put-message [user text]
  (dosync
    (alter chat-logs conj
      {:user user :text text :time (now)})))

(defn get-messages [time]
  (filter #(> (% :time ) time) @chat-logs))

;(push-user-to-queue "user")

;(put-message "user" "blblblbl")

;(println (get-messages (now)))

